import axios from "../utils/axios";
export let getlist = ()=>{ // 方法如果是异步的返回函数
    return (dispatch)=>{
        axios.get("/list").then(res=>{
            dispatch({
                type:"getlist",
                payload:res.data
            })
        })
    }
}
export let delfn = (data)=>{
    return {
        type:"delfn",
        payload:data 
    }
}
export let editfn = (data) =>{
    return {
        type:"editfn",
        payload:data
    }
}
export let addfn = (data)=>{
    return {
        type:"addfn",
        payload:data
    }
}